﻿* Encoding: UTF-8.



### The Following Code is Used to Filter Out Participants who Failed the Attention Checks ###

DATASET ACTIVATE DataSet1.
USE ALL.
RECODE ManiCheck1 (MISSING=0).
EXECUTE.
RECODE ManiCheck2 (MISSING=0).
EXECUTE.
COMPUTE filter_$=(ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0).
VARIABLE LABELS filter_$ 'ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.



### Figure 1 ###

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=ConditionCode MEAN(STAI_Mean) MEAN(STAXI_Mean) 
    MISSING=LISTWISE REPORTMISSING=NO
    TRANSFORM=VARSTOCASES(SUMMARY="#SUMMARY" INDEX="#INDEX")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: ConditionCode=col(source(s), name("ConditionCode"), unit.category())
  DATA: SUMMARY=col(source(s), name("#SUMMARY"))
  DATA: INDEX=col(source(s), name("#INDEX"), unit.category())
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(3), label("Exposure to Terror Condition"))
  GUIDE: axis(dim(2), label("Mean"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label(""))
  SCALE: cat(dim(3), include("1", "2", "3", "4", "5"))
  SCALE: linear(dim(2), include(0))
  SCALE: cat(aesthetic(aesthetic.color.interior), include("0", "1"))
  SCALE: cat(dim(1), include("0", "1"))
  ELEMENT: interval(position(INDEX*SUMMARY*ConditionCode), color.interior(INDEX), 
    shape.interior(shape.square))
END GPL.


### Table 3 - Rows 16 through 20 ###

EXAMINE VARIABLES=Retaliation_Reduced_Mean STAI_Mean STAXI_Mean BY ConditionCode
  /PLOT NONE
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.


### Table 3 - Rows 1 through 15 ###

SPLIT FILE SEPARATE BY CountryCode.
EXAMINE VARIABLES=Retaliation_Reduced_Mean STAI_Mean STAXI_Mean BY ConditionCode
  /PLOT NONE
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.



### Regression Analyses for Table 4 - Model 1 ###

SPLIT FILE OFF.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER DummyCyberFatal DummyCyberNonFatal DummyConventionalNonFatal DummyControl
    PoliticalPosition Year_4 Gender PreviousExposureAny PublicTransportUser Children_Binary DummyCountryCodeUS DummyCountryCodeUK.


### Regression Analyses for Table 4 - Models 2-4 (This splits the reuslts into country level results) ###

SPLIT FILE SEPARATE BY CountryCode.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER DummyCyberFatal DummyCyberNonFatal DummyConventionalNonFatal DummyControl
    PoliticalPosition Year_4 Gender PreviousExposureAny PublicTransportUser Children_Binary.



### Regression Analyses for Table 5 - Model 1 ###

SPLIT FILE OFF.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER DummyCyber DummyControl 
    PoliticalPosition Year_4 Gender PreviousExposureAny PublicTransportUser Children_Binary DummyCountryCodeUS DummyCountryCodeUK. 


### Regression Analyses for Table 5 - Model 2 ###

SPLIT FILE OFF.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER DummyNonFatal DummyControl 
    PoliticalPosition Year_4 Gender PreviousExposureAny PublicTransportUser Children_Binary DummyCountryCodeUS DummyCountryCodeUK. 




### Regression Analyses for Table 6 - Model 1.1 ###
### Note: The mediation analyses results at the bottom of this table appear in the accompanying R syntax file ###


DATASET ACTIVATE DataSet1.
USE ALL.
RECODE ManiCheck1 (MISSING=0).
EXECUTE.
RECODE ManiCheck2 (MISSING=0).
EXECUTE.
COMPUTE filter_$=((ConditionCode<>3 AND ConditionCode <> 4) AND (ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0)).
VARIABLE LABELS filter_$ 'ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT STAXI_Mean
  /METHOD=ENTER ConditionCodeY DummyCountryCodeUS DummyCountryCodeUK PoliticalPosition Year_4 Gender.


### Regression Analyses for Table 6 - Model 1.2 ###
### Note: The mediation analyses results at the bottom of this table appear in the accompanying R syntax file ###


DATASET ACTIVATE DataSet1.
USE ALL.
RECODE ManiCheck1 (MISSING=0).
EXECUTE.
RECODE ManiCheck2 (MISSING=0).
EXECUTE.
COMPUTE filter_$=((ConditionCode<>3 AND ConditionCode <> 4) AND (ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0)).
VARIABLE LABELS filter_$ 'ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER STAXI_Mean ConditionCodeY DummyCountryCodeUS DummyCountryCodeUK PoliticalPosition Year_4 Gender.


### Regression Analyses for Table 6 - Model 1.3 ###
### Note: The mediation analyses results at the bottom of this table appear in the accompanying R syntax file ###


DATASET ACTIVATE DataSet1.
USE ALL.
RECODE ManiCheck1 (MISSING=0).
EXECUTE.
RECODE ManiCheck2 (MISSING=0).
EXECUTE.
COMPUTE filter_$=((ConditionCode<>1 AND ConditionCode <> 2) AND (ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0)).
VARIABLE LABELS filter_$ 'ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT STAXI_Mean
  /METHOD=ENTER ConditionCodeZ DummyCountryCodeUS DummyCountryCodeUK PoliticalPosition Year_4 Gender.

### Regression Analyses for Table 6 - Model 1.4 ###
### Note: The mediation analyses results at the bottom of this table appear in the accompanying R syntax file ###


DATASET ACTIVATE DataSet1.
USE ALL.
RECODE ManiCheck1 (MISSING=0).
EXECUTE.
RECODE ManiCheck2 (MISSING=0).
EXECUTE.
COMPUTE filter_$=((ConditionCode<>1 AND ConditionCode <> 2) AND (ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0)).
VARIABLE LABELS filter_$ 'ManiCheck1 = 1 OR ManiCheck2=2 OR ManiCheck1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA CHANGE
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Retaliation_Reduced_Mean
  /METHOD=ENTER STAXI_Mean ConditionCodeZ DummyCountryCodeUS DummyCountryCodeUK PoliticalPosition Year_4 Gender.




### Initial Data Cleaning ###


COMPUTE PreviousExposureAny=(Previous_exposure_1= 1 OR Previous_exposure_2=1 OR Previous_exposure_3= 1 or Previous_exposure_4=1).
Execute.

COMPUTE PublicTransportUser=(Transportation_Use_2>3 OR Transportation_Use_3>3 OR Transportation_Use_4>3).
Execute.

RECODE Children_4 (SYSMIS=SYSMIS) (0 thru 0=0) (1 thru 25=1) INTO 
    Children_Binary.
VARIABLE LABELS  Children_Binary 'no children = 0; Children = 1'.
EXECUTE.

RECODE STAI_2 (1=6) (2=5) (3=4) (4=3) (5=2) (6=1) INTO STAI_2_RE.
VARIABLE LABELS  STAI_2_RE 'STAI_2_recoded'.
EXECUTE.

RECODE STAI_3 (1=6) (2=5) (3=4) (4=3) (5=2) (6=1) INTO STAI_3_RE.
EXECUTE.

RECODE STAI_5 (1=6) (2=5) (3=4) (4=3) (5=2) (6=1) INTO STAI_5_RE.
VARIABLE LABELS  STAI_5_RE 'STAI_2_recoded'.
EXECUTE.

COMPUTE STAI_Mean=MEAN(STAI_1,STAI_2_RE,STAI_3_RE,STAI_4,STAI_5_RE,STAI_6).
EXECUTE.

COMPUTE STAXI_Mean=MEAN(STAXI_1,STAXI_2,STAXI_3,STAXI_4).
EXECUTE.

COMPUTE Retaliation_Mean=MEAN(Retaliation_1,Retaliation_2,Retaliation_3,Retaliation_4,Retaliation_5,
    Retaliation_6).
EXECUTE.

COMPUTE Retaliation_Reduced_Mean=MEAN(Retaliation_1,Retaliation_3,Retaliation_5,
    Retaliation_6).
EXECUTE.

COMPUTE Threat_Personal_MEAN=MEAN(Threat_personal_1, Threat_personal_2, Threat_personal_3).
EXECUTE.
